﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AnesSystem.Controls.CommonTables.SC.CDTY
{
    /// <summary>
    /// HuShiFangShiCtrl.xaml 的交互逻辑
    /// </summary>
    public partial class HuShiFangShiCtrl : CustomCommonTableCtrl
    {
        public HuShiFangShiCtrl()
        {
            InitializeComponent();
            IniteRadioBation();
        }

        private void fssj_GotFocus(object sender, RoutedEventArgs e)
        {
            CusDatePickerWin cusDatePicker = new CusDatePickerWin();
            cusDatePicker.SelectedDateTime = DateTime.Now;
            cusDatePicker.ShowDialog();
            if (cusDatePicker.Result)
            {
                fssj.Value = cusDatePicker.SelectedDateTime.ToString(DateFormat.DATE_FORMAT_STR_YMD_CN);//xxxx年xx月xx日
            }
        }

        private void fssj2_GotFocus(object sender, RoutedEventArgs e)
        {
            CusDatePickerWin cusDatePicker = new CusDatePickerWin();
            cusDatePicker.SelectedDateTime = DateTime.Now;
            cusDatePicker.ShowDialog();
            if (cusDatePicker.Result)
            {
                fssj2.Value = cusDatePicker.SelectedDateTime.ToString(DateFormat.DATE_FORMAT_STR_YMD_CN);//xxxx年xx月xx日
            }
        }
        private void IniteRadioBation()
        {
            new RadioButtonHelper().ChangeRadioSatus(zq,jz);
            new RadioButtonHelper().ChangeRadioSatus(qx,ss,qhm,shm);
            new RadioButtonHelper().ChangeRadioSatus(qc,bqc);
            new RadioButtonHelper().ChangeRadioSatus(gmf,gmy);
            new RadioButtonHelper().ChangeRadioSatus(wz,yc);
            new RadioButtonHelper().ChangeRadioSatus(zht_hao,zht_cha,zht_yb);
            new RadioButtonHelper().ChangeRadioSatus(shk_jt, shk_wt, shk_tt, shk_wt1);
            new RadioButtonHelper().ChangeRadioSatus(shk_shx, shk_shab,shk_wshx);
            new RadioButtonHelper().ChangeRadioSatus(zhs_y, zhuos_n);
            new RadioButtonHelper().ChangeRadioSatus(td_hao, td_jiaohao, td_yb, td_cha);
            new RadioButtonHelper().ChangeRadioSatus(pj_hao, pj_jhao, pj_yb, pj_cha);
            new RadioButtonHelper().ChangeRadioSatus(jsh_qc, jsh_yb, jsh_bqc);
         
        }
    }
}
